package com.wlz.behavioral.chainofresponsibility;

public abstract class Handle {
    private Handle handle;
    private String name;
    private String flower;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取当前请求
     * @return
     */
    public Handle getHandle() {
        return handle;
    }

    /**
     * 设置下一个请求
     * @param handle
     */
    public void setHandle(Handle handle) {
        this.handle = handle;
    }

    /**
     * 处理当前请求的方法
     */
    public abstract void handleRequest(String flower);

    public String getFlower() {
        return flower;
    }

    public void setFlower(String flower) {
        this.flower = flower;
    }
}